package cloud.maque.module.system.extend.impl;


import cloud.maque.module.system.extend.UserRoleExtendService;
import cloud.maque.module.system.service.RolePrivilegeService;
import cloud.maque.module.system.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserRoleExtendServiceImpl implements UserRoleExtendService {

    @Autowired
    RoleService roleService;

    @Autowired
    RolePrivilegeService rolePrivilegeService;

    @Override
    @Transactional
    public Boolean DeleteRole(String roleId) {

        roleService.DeleteRole(roleId);

        rolePrivilegeService.DeleteByRoleId(roleId);

        return true;
    }
}
